ICEBlaster: A Drag’n’Drop Bitstream Loader For ICE40 | Hackaday

2022-10-02 01:54:33 By : Mr. GANG Li

The iCE40 series of FPGAs gets a fair bit of coverage on these pages, largely due to its accessibility (thanks to huge efforts in reverse engineering and open tool chains) and likely also due to Lattice Semiconductors’ attitude to open source in general. Whilst these devices are small and rather limited, you can’t really beat them for a first foray into the subject. They’re plenty beefy enough for many of the simpler FPGA applications. [TinLethax] over on Hackaday.IO has plenty of experience with the devices, and has added another tool to our collective iCE40 arsenal, namely iCEBlaster, a USB mass storage device (MSC) style bootloader for drag-n-drop bitstream loading. The days of needing dedicated special programmers are starting to be numbered, with many chips now presenting a USB mass storage device to the host in order to upload the firmware image.

FPGAs don’t tend to operate this way, needing a device-specific bitstream loading upon start-up, which (unless they have OTP memory) is usually the job of an external configuration memory. iCEBlaster (a play on the Xilinx ByteBlaster programmer, maybe?) runs on the STM32F4xx series devices at least, but should be easily portable to others. The idea is pretty straightforward — dragging a new bitstream file onto the storage device initiates an FPGA target reset, which in turn allows the STM32 to send the bitstream over to the iCE40 via the SPI interface. Nothing more than that.

If you’ve been looking to get into the iCE40, this guide might be a good starting point, and every learning experience needs a good project to drive it, how about running Doom on a softcore RISC-V?

They totally passed up the chance to program it with another iCE40!

Nice idea! Might try that later.

Recursive programmers are the worst of all tools. I still remember how I wanted to program an AT89C2051 microcontroller but the problem was that all open-source programmers required a programmed microcontroller, the same one, meant I could not program it. I was a kid with no credit card to buy a preprogrammed chip from anywhere or a real programmer. Let’s think – you want to program iCE40, but programmers which are sold, are expensive. The cheap one requires you to have the expensive one to make the cheap one. Catch 22.

I find this whole story hard to believe.

Mostly because it implies they were able to buy an FPGA in 2022.

You can have a nice and not so crazy (~1k LUTs) FPGA dev board for just $10 (Gowin FPGA on Tang nano 1k). I built my own breakout board for iCE40LP1K-CM36 bacl in April this year(the one in the picture above, iCEHAX40 board). Did some design rules violation to get 3.5mil trace with OSHpark 2 layers board. The cost of building that board (3 boards, 3 chips) is less than $20.

With people below suggesting to run Doom on a softcore, there are also Tang Nano 4K and 9K boards with 8MB internal RAM and HDMI connector.

But no production grade OSS toolchain …

The iCE40 OSS toolchain is really good. It’s _still_ missing some stuff but you can still do a lot. The one for the GoWin parts is missing some really basic stuff like block ram support last time I checked so it’s really only if you want to work on the toolchain rather than using the device for a serious project.

ICE40 SPI boot is super easy – here’s a tiny Micropython module that does the same from an ESP32: https://github.com/al177/blinkencard/blob/master/micropython/iceboot.py

đź‘Ť – I really ™should™ try this with my idling Upduino1 boards…

“running Doom on a softcore RISC-V?”

Sylvain also ported Linux to the RISC-V softcore on the ICE40 with a RAM extension:

https://www.youtube.com/watch?v=d-STNmJ0zrI

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.

By using our website and services, you expressly agree to the placement of our performance, functionality and advertising cookies. Learn more